package com.czmh.etc.interpreter.entity.base;


import org.apache.commons.lang.StringUtils;

/**
 * Created by Huangyk on 2019/6/5.
 */
public class RequestBody extends Header {
    public static int BODY_LEN = Header.HEADER_LEN + 41;

    /**
     * 流水号，共20位，2位银行编码 + 14位业务时间 + 4位业务序号
     */
    private String WasteSn;

    /**
     * 网点编号，2位银行代码 + 5位网点号
     */
    private String PosID;

    /**
     * 终端机编号，终端机编号，需要银行提供
     */
    private String TerminalID;

    public RequestBody(EnMessagetype msgType) {
        super(msgType);
    }

    @Override
    public String toString() {
        return super.toString() +
                this.WasteSn +
                this.PosID +
                StringUtils.leftPad(this.TerminalID, 14, ' ')
                ;
    }

    //region getter && setter
    public String getWasteSn() {
        return WasteSn;
    }

    public void setWasteSn(String wasteSn) {
        WasteSn = wasteSn;
    }

    public String getPosID() {
        return PosID;
    }

    public void setPosID(String posID) {
        PosID = posID;
    }

    public String getTerminalID() {
        return TerminalID;
    }

    public void setTerminalID(String terminalID) {
        TerminalID = terminalID;
    }
    //endregion
}
